import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

const store = new Vuex.Store({
  state: {
		role: '1',//0是供应商版 1商家版 切换这个
		departInfo: {},
		loggedIn: {}, // 代表登录状态的promise
	},
  mutations: {
		setUserRole(state, provider) {
			state.role = provider
		},
		setDepartInfo(state, provider) {
			state.departInfo = Object.assign(state.departInfo, provider)
		}
	},
	
	
	
	
	
	
});

export default store
